package main

import (
	"fmt"
	"sync"
)

var rwlock sync.RWMutex
var A = 10

func S() int {
	rwlock.RLock()
	A = 10
	rwlock.RUnlock()
	return A
}

func main() {
	A = A + 1
	a := S()
	fmt.Println(a)
	fmt.Println(A)
}
